'use client';
import React from "react";
import {useRouter} from "next/navigation";

type Props = {
    children: React.ReactNode
    course: string
}

export default function Span({children, course}: Props) {
    const route = useRouter()
    return (
        <span onClick={() => {
            route.push(`/course?c=${course}`)
        }}
              className={'bg-amber-300 hover:bg-amber-200 hover:border-2 rounded-lg p-4'}>
                        {children}
                    </span>
    )
}